package com.taxi.controller;

import com.taxi.result.Result;
import com.taxi.service.ServiceFromMapService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: aniu
 * @Date: 2023/9/30
 * @ClassName: ServiceController
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@RestController
@RequestMapping("/service")
public class ServiceController {

    @Autowired
    private ServiceFromMapService serviceFromMapService;

    //创建服务
    @ApiOperation("创建服务")
    @PostMapping("/add")
    public Result add(String name){
        return serviceFromMapService.add(name);
    }
}
